/**
 *  SOsim: Simulator for Operating Systems Education
 *
 * 		SOsim is a simulator with visual facilities to serve as an effective 
 *  support tool for the better teaching and learning of the concepts and techniques 
 *  in modern operating systems, serving as a way to render the whole process more 
 *  efficient.
 *  Copyright (C) 2011  Luiz Paulo Maia
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
 
package br.org.sosim.view

import f_Log.Units;
import java.io.*;
import java.util.*;

    public static partial (TfrmLog)
    {
        public String NameFile = null;
        public String File = null;
        public TfrmLog()
        {
            InitializeComponent();
        }

        public void AddLine(string S, Color Cor)
        {
            public String msg;
            
            msg = (f_Console.Units.f_Console.Clock.TempoTotalSim).ToString() + " : " + S;
            try {
                
                memLog.Color = Cor;
                memLog.Lines.Add(msg);
            }
            catch(Exception e){  
            System.out.println(e.getmsg());  
            throw new Exception (e.getmsg());
              
            }
           	System.out.println(msg);
        }

        public void FormCreate(String Sender, System.EventArgs _e1)
        {
            
            NameFile = "log" + ("mmddhhnn", DateTime.Now) + ".txt";
            File File = new File(NameFile);
            FileWriter _W_0 = File.CreateText();
        }

        public void FormDestroy(Object Sender)
        {
            _W_0.Close();
        }

       
        public void FormClose(Object Sender, EventArgs _e1)
        {
            f_Console.Units.f_Console.Form1.Log1.Checked = false;
        }

    } 
	

}


    public class f_Log
    {
        public static TfrmLog frmLog = null;
    } 



